import request from '@/utils/request';

// 查询系统配置列表
export function listSystem(query) {
	return request({
		url: '/system/system/list',
		method: 'post',
		data: query,
	});
}

// 查询系统配置
export function getInfoByName(query) {
	return request({
		url: '/system/system/getInfoByName',
		method: 'post',
		params: query,
	});
}

// 编辑系统配置
export function editKeyValueByName(data) {
	return request({
		url: '/system/system/editKeyValueByName',
		method: 'post',
		data: data,
	});
}

// 查询系统配置详细
export function getSystem(id) {
	return request({
		url: '/system/system/getInfo',
		method: 'post',
		data: id,
	});
}

// 新增系统配置
export function addSystem(data) {
	return request({
		url: '/system/system/add',
		method: 'post',
		data: data,
	});
}

// 编辑系统配置
export function updateSystem(data) {
	return request({
		url: '/system/system/edit',
		method: 'post',
		data: data,
	});
}

// 删除系统配置
export function delSystem(id) {
	return request({
		url: '/system/system/remove',
		method: 'post',
		data: id,
	});
}

// 导出系统配置
export function exportSystem(query) {
	return request({
		url: '/system/system/export',
		method: 'post',
		params: query,
	});
}
